Skip to content

Fix typos and improve documentation - #1

Open
ZHENRZHANG wants to merge 1 commit into
mbercx:mainfrom
ZHENRZHANG:main
Open

Fix typos and improve documentation#1
ZHENRZHANG wants to merge 1 commit into
mbercx:mainfrom
ZHENRZHANG:main

Conversation

@ZHENRZHANG

Copy link
Copy Markdown
Contributor
  • Rename contants.py to constants.py (fix typo)
  • Update import statement in deprecation.py
  • Fix command name in documentation (mc3d-source -> mc3d)
  • Fix typo 'environmens' -> 'environments' in developer.md
  • Fix duplicate command in pre-commit section
  • Remove useless len() call in deprecation.py

- Rename contants.py to constants.py (fix typo)
- Update import statement in deprecation.py
- Fix command name in documentation (mc3d-source -> mc3d)
- Fix typo 'environmens' -> 'environments' in developer.md
- Fix duplicate command in pre-commit section
- Remove useless len() call in deprecation.py

@mbercx mbercx left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ZHENRZHANG! Must say I'm a little surprised to see a PR here, but glad to have the contribution.

I'm afraid you caught me with my pants down. I still had some local commits that weren't pushed yet, so indeed some of the documentation was incorrect. The code is also still largely untested for now, so here be dragons.

In #2 I update the package to the latest template version. Also will be doing some updates there shortly. After that you'll probably have some merge conflicts. Happy to clean that up for you and get the other fixes in.

Comment thread docs/developer.md

We use [Hatch](https://hatch.pypa.io/latest) to set up environments and scripts for most developer tasks.
To see a table of the available environmens and their scripts, run:
To see a table of the available environments and their scripts, run:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This has been fixed in my template package here: mbercx/python-copier@3a3ee25

I've added you as a co-author on fd58efa to properly attribute your contribution.

Comment thread docs/developer.md
Or run them via:

hatch run precommit:install
hatch run precommit:run

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, fixed in mbercx/python-copier@3a3ee25.

Comment thread docs/topics.md
1. Do a full import of all the raw `CifData`.
1. Run the `CifCleanWorkChain` for all of them.
3. "Curate" the structures with `mc3d-source curate`.
3. "Curate" the structures with `mc3d curate`.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, I had changed this locally, but hadn't pushed yet. I adapted this command to mc3d-source, since we'll most likely have other "mc3d" commands in the future, see 4657902.

Comment thread docs/usage.md

```
mc3d-source --help
mc3d --help

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

from rich import print as rprint

from mc3d_source.contants import SourceDeprecation
from mc3d_source.constants import SourceDeprecation

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah! Seems I actually made a typo in the module name, and then tab-completed the import here. Thanks for spotting, will fix this in a separate commit for the module name, if that's ok?

rprint(f"[bold yellow]Report:[/] Found {len(old_source_were_fine)} structures where the old source was fine.")

new_sources_taken = new_sources.difference(old_source_were_fine)
len(new_sources_taken)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one most certainly should go. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants